package cn.dt70.service;

import cn.dt70.pojo.AqbReward;
import cn.dt70.utils.PageSupport;

import javax.persistence.criteria.CriteriaBuilder;
import java.util.Date;
import java.util.List;

public interface AqbRewardService {

    //用户获得奖励金
    boolean getReward(AqbReward aqbReward)throws Exception;
    //修改奖励金的状态
    boolean updateStatus(Integer rewordId)throws Exception;

    //根据奖励金的类型获得所有的的奖励金
    Integer sumReward(Integer userId, Integer rewardType) throws Exception;

    //根据奖励金的类型查询所有的奖励金
    List<AqbReward> getAllRewardByStatus(Integer userId,Integer rewardType,Integer startDay) throws Exception;

    //查询一段时间的奖励金流水
    List<AqbReward> getAllRewardByStatusAndTime(Integer userId,Integer rewardType, Date begin, Date end) throws Exception;

    //查询奖励金流水
    List<AqbReward> getAllReward(Integer userId,
                                 Integer rewardType,
                                 Integer startDay,
                                 PageSupport ps) throws Exception;

    //查询奖励金流水用户自己输入时间
    List<AqbReward> getAllRewardByTime(Integer userId,
                                       Integer rewardType,
                                       Date begin,
                                       Date end,
                                       PageSupport ps) throws Exception;

    //根据用户id查询用户的奖励金
    List<AqbReward> getRewards(Integer userId) throws Exception;

    //查询用户剩下的奖励金
    int surplus(Integer userId,Integer rewardType) throws Exception;

    //查询用户奖励金的信息
    AqbReward rewardInformation(Integer userId) throws Exception;

}
